package com.lhwb.escsvinput.vo.conver;

import java.util.List;

import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.converters.ReadConverterContext;
import com.alibaba.fastjson.JSON;

import com.lhwb.escsvinput.vo.Cast;

public class CastListConverter implements Converter<List<Cast>> {


    @Override
    public List<Cast> convertToJavaData(ReadConverterContext<?> context) {
        try{
            return JSON.parseArray(context.getReadCellData().getStringValue(), Cast.class);
        }catch (Exception e) {
            System.out.println("转换失败"+context.getReadCellData().getStringValue());
            return null;
        }
    }

}
